package com.charley.icloud.backup.constants;

import java.io.File;
import java.util.Objects;

/**
 * 常量类
 * @author charley
 * @date 2024-04-26 10:43
 */
public interface BackupConstants {

	/** 备份目录名称 */
	String BACKUP_FOLDER_NAME = "_icloud_backup";
	/** 备份目录 */
	String BACKUP_FOLDER = System.getProperty("user.home") + File.separator + BACKUP_FOLDER_NAME + File.separator;
	//String RESOURCE_PATH = Objects.requireNonNull(Thread.currentThread().getContextClassLoader().getResource("")).getPath().split("/target")[0];
	//String BACKUP_FOLDER = "F:\\base-icloud-platform\\zsql" + File.separator + BACKUP_FOLDER_NAME + File.separator;
//	String BACKUP_FOLDER = "E:\\JavaProjects\\base-icloud-platform\\zsql" + File.separator + BACKUP_FOLDER_NAME + File.separator;
	/** 还原目录，默认就是备份目录 */
	String RESTORE_FOLDER = BACKUP_FOLDER;
	/** 日期格式 */
	String DATE_TIME_FORMAT = "yyyy-MM-dd_HHmmss";
	String DATE_FORMAT = "yyyy-MM-dd";
	/** SQL拓展名 */
	String SQL_EXT = ".sql";
	/** 默认备份文件名 */
	String BACKUP_FILE_NAME = "icloud" + SQL_EXT;
	/** 默认备份还原目录名称 */
	String DEFAULT_BACKUP_NAME = "backup";
	/** 默认备份还原文件 */
	String DEFAULT_RESTORE_FILE = BACKUP_FOLDER + DEFAULT_BACKUP_NAME + File.separator + BACKUP_FILE_NAME;

}
